﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using CustomMVC;
using EFMysql;

namespace ShuaDanMysql
{
    public class MvcApplication : System.Web.HttpApplication
    {
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            
        }

        protected void Session_Start()
        {
           
        }

        protected void Session_End()
        {
            List<Tuple<pre_user, string, int, List<pre_privileges>>> users = WebVar<Tuple<pre_user, string, int, List<pre_privileges>>>.GetList;
            Tuple<pre_user, string, int, List<pre_privileges>> current = users.Find(o => o.Item2 == Session.SessionID);
            users.Remove(current);
        }

        protected void Application_End()
        {

        }
    }
}
